package com.cxhc.demo1006;

import android.util.Log;

import com.cxhc.demo1006.module.GirlsBean;
import com.cxhc.demo1006.presenter.BasePresenter;

public class MainPresenter extends BasePresenter {

    private MainView view;
    private MainModule mainModule;

    public MainPresenter(MainView view) {
        this.view = view;
        this.mainModule = new MainModule();
    }


    public static final String TAG = MainPresenter.class.getSimpleName();
    public void getGilrs(int page){
        mainModule.getGirls(page,new ImainModuleCallBack() {
            @Override
            public void getDataSucceess(GirlsBean girlsBean) {
                view.onGirlsLoaded(girlsBean);
            }

            @Override
            public void getDataError() {
                Log.e(TAG, "getDataError: ");
                view.onGirlsLoadError();
            }
        });
    }
}
